package com.donfu.system.domain.house;

import java.math.BigDecimal;
import java.util.Date;

import com.donfu.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.donfu.common.annotation.Excel;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 购物车对象 house_cart
 * 
 * @author donfu
 * @date 2021-12-07
 */
public class HouseCart
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 用户表的用户ID */
    @Excel(name = "用户表的用户ID")
    @NotNull(message = "用户ID不能为空")
    private Long userId;

    /** 商品表的商品ID */
    @Excel(name = "商品表的商品ID")
    @NotNull(message = "商品ID不能为空")
    private Long goodsId;

    /** 商品名称 */
    @Excel(name = "商品名称")
    @NotNull(message = "商品名称不能为空")
    private String goodsName;

    /** 产品id */
    @Excel(name = "产品id")
    @NotNull(message = "产品id不能为空")
    private Long productId;

    /** 商品货品的价格 */
    @Excel(name = "商品货品的价格")
    @NotNull(message = "商品货品的价格不能为空")
    private BigDecimal price;

    /** 商品货品的数量 */
    @Excel(name = "商品货品的数量")
    @NotNull(message = "商品货品的数量不能为空")
    private Integer number;

    /** 商品规格值列表，采用JSON数组格式 */
    @Excel(name = "商品规格值列表，采用JSON数组格式")
    @NotNull(message = "商品规格值列表不能为空")
    private String specifications;

    /** 商品图片或者商品货品图片 */
    @Excel(name = "商品图片或者商品货品图片")
    @NotNull(message = "商品图片不能为空")
    private String picUrl;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date addTime;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /** 逻辑删除 */
    @Excel(name = "逻辑删除")
    private Integer deleted;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Long getId()
    {
        return id;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setGoodsId(Long goodsId) 
    {
        this.goodsId = goodsId;
    }

    public Long getGoodsId() 
    {
        return goodsId;
    }
    public void setGoodsName(String goodsName) 
    {
        this.goodsName = goodsName;
    }

    public String getGoodsName() 
    {
        return goodsName;
    }
    public void setProductId(Long productId) 
    {
        this.productId = productId;
    }

    public Long getProductId() 
    {
        return productId;
    }
    public void setPrice(BigDecimal price) 
    {
        this.price = price;
    }

    public BigDecimal getPrice() 
    {
        return price;
    }
    public void setNumber(Integer number) 
    {
        this.number = number;
    }

    public Integer getNumber() 
    {
        return number;
    }
    public void setSpecifications(String specifications) 
    {
        this.specifications = specifications;
    }

    public String getSpecifications() 
    {
        return specifications;
    }
    public void setPicUrl(String picUrl) 
    {
        this.picUrl = picUrl;
    }

    public String getPicUrl() 
    {
        return picUrl;
    }
    public void setAddTime(Date addTime) 
    {
        this.addTime = addTime;
    }

    public Date getAddTime() 
    {
        return addTime;
    }
    public void setDeleted(Integer deleted) 
    {
        this.deleted = deleted;
    }

    public Integer getDeleted() 
    {
        return deleted;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("goodsId", getGoodsId())
            .append("goodsName", getGoodsName())
            .append("productId", getProductId())
            .append("price", getPrice())
            .append("number", getNumber())
            .append("specifications", getSpecifications())
            .append("picUrl", getPicUrl())
            .append("addTime", getAddTime())
            .append("updateTime", getUpdateTime())
            .append("deleted", getDeleted())
            .toString();
    }
}
